﻿<%@ Page Language="C#" MasterPageFile="~/Masterpages/Default.master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="Blazing.UI.Cms.Admin.ManageUsers" Title="Manage Users" %>
<%@ Register Src="../Usercontrols/Loading.ascx" TagName="Loading" TagPrefix="uc3" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Manage Users</h1>
    <br />
    <asp:TextBox ID="txtMemberName" runat="server"></asp:TextBox>
    <asp:Button ID="btnSearch" runat="server" Text="Search" />
        <asp:ObjectDataSource ID="odsMembers" runat="server" 
        OldValuesParameterFormatString="original_{0}" 
        onselecting="odsMembers_Selecting" SelectMethod="SearchMembers" 
        TypeName="Blazing.UI.Cms.Admin.Classes.MembershipContext">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtMemberName" DefaultValue="*" 
                Name="username" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br /><br />
    
    <ajax:UpdatePanel ID="UpdatePanel1" runat="server">
        <contenttemplate>
        <div class="grid">
    <asp:GridView ID="grdMembers" runat="server" AutoGenerateColumns="False" 
        DataSourceID="odsMembers" DataKeyNames="ProviderUserKey" Width="100%" 
                EmptyDataText="No users were found">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly="True" 
                SortExpression="UserName" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Comment" HeaderText="Comment" 
                SortExpression="Comment" />
            <asp:CheckBoxField DataField="IsApproved" HeaderText="IsApproved" 
                SortExpression="IsApproved" />
            <asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut" 
                ReadOnly="True" SortExpression="IsLockedOut" />
            <asp:BoundField DataField="LastLoginDate" HeaderText="LastLoginDate" 
                ReadOnly="True" SortExpression="LastLoginDate" />
            <asp:CheckBoxField DataField="IsOnline" HeaderText="IsOnline" 
                SortExpression="IsOnline" ReadOnly="true" />
            <%--<asp:CommandField ShowEditButton="True" />--%>
        </Columns>
    </asp:GridView>
    </div>
    <br />
    <asp:LinkButton ID="LinkButtonInsertMember" runat="server">Add Member</asp:LinkButton>   
    <br /><br />
    
    <asp:Panel ID="PanelAddMember" runat="server" SkinID="PopupPanel1">
        <div class="PopupPanelInner" style="width: 300px;">
            <asp:Panel runat="server" ID="PanelAddMemberTitle" CssClass="PopupTitle">
                Add New Member</asp:Panel>
    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" 
                oncreateduser="CreateUserWizard1_CreatedUser">
        <WizardSteps>
            <asp:CreateUserWizardStep runat="server" />
            <asp:CompleteWizardStep runat="server" />
        </WizardSteps>
    </asp:CreateUserWizard>
    
            <asp:Button ID="btnClose" runat="server" Text="Close Window" 
                />
    
    </div></asp:Panel>
     <ajax:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButtonInsertMember"
        PopupControlID="PanelAddMember" PopupDragHandleControlID="PanelAddMemberTitle" SkinID="Popup1" CancelControlID="btnClose">
    </ajax:ModalPopupExtender>
    </contenttemplate>
    </ajax:UpdatePanel>

    <ajax:UpdateProgress runat="server" ID="update" DisplayAfter="50">
        <progresstemplate>
        <uc3:Loading ID="Loading1" runat="server" />
    </progresstemplate>
    </ajax:UpdateProgress>
</asp:Content>
